package chapter12

/**
  * @Copyright: Shanghai Definesys Company.All rights reserved.
  * @Description:
  * @author: chuhaitao
  * @since: 2019/1/23 22:17
  * @history:
  *          1.2019/1/23 created by chuhaitao
  */
object HighDemo {

  def main(args: Array[String]): Unit = {

    def test(f:Double=>Double,n1:Double)={
      f(n1)
    }
    def sum(n1:Double):Double={
          n1+2
    }

    val res=test(sum,6.0);

    println(res)
  }
}
